import { postAxios, getAxios, postDownloadAxios } from '@/lib/http';

export const gearboxApi = {

    getById: (id) => {
      return getAxios(`/gearbox/getById/${id}`);
    },

    // 添加变速箱 @author 何杺
    addGearbox: (data) => {
        return postAxios('/gearbox/add', data);
    },
    // 分页查询变速箱 @author 何杺
    queryGearbox: (data) => {
        return postAxios('/gearbox/page/query', data);
    },
    // 批量删除变速箱 @author 何杺
    batchDeleteGearbox: (idList) => {
        return postAxios('/gearbox/deleteByIds', idList);
    },
    // 修改变速箱  @author 何杺
    updateGearbox: (data) => {
        return postAxios('/gearbox/update',data);
    },
    // 导出全部  @author 何杺
    exportAll:(data)=>{
        return postDownloadAxios('/gearbox/export/all',data);
    },
    // 批量导出  @author 何杺
    batchExport: (idList) => {
        return postDownloadAxios('/gearbox/export/batch', idList);
    },
};
